package cn.growthgate.fgo.entity;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.baomidou.mybatisplus.enums.IdType;

import cn.growthgate.fgo.entity.enums.ServantStage;

/**
 * <p>
 * 我的从者
 * </p>
 *
 * @author GrowthGate
 * @since 2019-05-29
 */
@TableName("t_my_servant")
public class MyServant extends Model<MyServant> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键id
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 用户id
	 */
	private Long userId;

	/**
	 * 从者id
	 */
	@NotNull(message = "从者不能为空")
	private Long servantId;

	/**
	 * 再临阶段
	 */
	private ServantStage stage;

	/**
	 * 圣杯数
	 */
	@Min(value = 0, message = "圣杯数不能小于0")
	@Max(value = 10, message = "圣杯数不能大于10")
	private Integer holyGrail;

	/**
	 * 等级
	 */
	@Min(value = 1, message = "等级不能小于1")
	@Max(value = 100, message = "等级不能大于100")
	private Integer level;

	/**
	 * 宝具等级
	 */
	@Min(value = 1, message = "宝具等级不能小于1")
	@Max(value = 5, message = "宝具等级不能大于5")
	private Integer npLevel;

	/**
	 * 技能1等级
	 */
	@Min(value = 0, message = "技能等级不能小于0")
	@Max(value = 10, message = "技能等级不能大于10")
	private Integer skill1;

	/**
	 * 技能2等级
	 */
	@Min(value = 0, message = "技能等级不能小于0")
	@Max(value = 10, message = "技能等级不能大于10")
	private Integer skill2;

	/**
	 * 技能3等级
	 */
	@Min(value = 0, message = "技能等级不能小于0")
	@Max(value = 10, message = "技能等级不能大于10")
	private Integer skill3;

	/**
	 * hp强化
	 */
	@Min(value = 0, message = "hp强化不能小于0")
	@Max(value = 2000, message = "hp强化不能大于2000")
	private Integer ffHp;

	/**
	 * atk强化
	 */
	@Min(value = 0, message = "atk强化不能小于0")
	@Max(value = 2000, message = "atk强化不能大于2000")
	private Integer ffAtk;

	/**
	 * hp
	 */
	@TableField(strategy = FieldStrategy.IGNORED)
	private Integer hp;

	/**
	 * atk
	 */
	@TableField(strategy = FieldStrategy.IGNORED)
	private Integer atk;

	/**
	 * 羁绊等级
	 */
	private Integer bondLevel;

	/**
	 * 羁绊值
	 */
	@Min(value = 0, message = "羁绊值不能小于0")
	private Integer bondValue;

	/**
	 * 平均每日羁绊
	 */
	private Integer dailyBond;

	/**
	 * 获得日期
	 */
	@Past(message = "无法获得未来的从者")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date getDate;

	/**
	 * 最后更新时间
	 */
	private Date lastUpdateTime;

	/**
	 * 再临阶段
	 */
	private ServantStage toStage;

	/**
	 * 技能1等级
	 */
	@Min(value = 0, message = "技能等级不能小于0")
	@Max(value = 10, message = "技能等级不能大于10")
	private Integer toSkill1;

	/**
	 * 技能2等级
	 */
	@Min(value = 0, message = "技能等级不能小于0")
	@Max(value = 10, message = "技能等级不能大于10")
	private Integer toSkill2;

	/**
	 * 技能3等级
	 */
	@Min(value = 0, message = "技能等级不能小于0")
	@Max(value = 10, message = "技能等级不能大于10")
	private Integer toSkill3;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getServantId() {
		return servantId;
	}

	public void setServantId(Long servantId) {
		this.servantId = servantId;
	}

	public ServantStage getStage() {
		return stage;
	}

	public void setStage(ServantStage stage) {
		this.stage = stage;
	}

	public Integer getHolyGrail() {
		return holyGrail;
	}

	public void setHolyGrail(Integer holyGrail) {
		this.holyGrail = holyGrail;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Integer getNpLevel() {
		return npLevel;
	}

	public void setNpLevel(Integer npLevel) {
		this.npLevel = npLevel;
	}

	public Integer getSkill1() {
		return skill1;
	}

	public void setSkill1(Integer skill1) {
		this.skill1 = skill1;
	}

	public Integer getSkill2() {
		return skill2;
	}

	public void setSkill2(Integer skill2) {
		this.skill2 = skill2;
	}

	public Integer getSkill3() {
		return skill3;
	}

	public void setSkill3(Integer skill3) {
		this.skill3 = skill3;
	}

	public Integer getFfHp() {
		return ffHp;
	}

	public void setFfHp(Integer ffHp) {
		this.ffHp = ffHp;
	}

	public Integer getFfAtk() {
		return ffAtk;
	}

	public void setFfAtk(Integer ffAtk) {
		this.ffAtk = ffAtk;
	}

	public Integer getHp() {
		return hp;
	}

	public void setHp(Integer hp) {
		this.hp = hp;
	}

	public Integer getAtk() {
		return atk;
	}

	public void setAtk(Integer atk) {
		this.atk = atk;
	}

	public Integer getBondLevel() {
		return bondLevel;
	}

	public void setBondLevel(Integer bondLevel) {
		this.bondLevel = bondLevel;
	}

	public Integer getBondValue() {
		return bondValue;
	}

	public void setBondValue(Integer bondValue) {
		this.bondValue = bondValue;
	}

	public Integer getDailyBond() {
		return dailyBond;
	}

	public void setDailyBond(Integer dailyBond) {
		this.dailyBond = dailyBond;
	}

	public Date getGetDate() {
		return getDate;
	}

	public void setGetDate(Date getDate) {
		this.getDate = getDate;
	}

	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	public ServantStage getToStage() {
		return toStage;
	}

	public void setToStage(ServantStage toStage) {
		this.toStage = toStage;
	}

	public Integer getToSkill1() {
		return toSkill1;
	}

	public void setToSkill1(Integer toSkill1) {
		this.toSkill1 = toSkill1;
	}

	public Integer getToSkill2() {
		return toSkill2;
	}

	public void setToSkill2(Integer toSkill2) {
		this.toSkill2 = toSkill2;
	}

	public Integer getToSkill3() {
		return toSkill3;
	}

	public void setToSkill3(Integer toSkill3) {
		this.toSkill3 = toSkill3;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "MyServant [id=" + id + ", userId=" + userId + ", servantId=" + servantId + ", stage=" + stage
				+ ", holyGrail=" + holyGrail + ", level=" + level + ", npLevel=" + npLevel + ", skill1=" + skill1
				+ ", skill2=" + skill2 + ", skill3=" + skill3 + ", ffHp=" + ffHp + ", ffAtk=" + ffAtk + ", hp=" + hp
				+ ", atk=" + atk + ", bondLevel=" + bondLevel + ", bondValue=" + bondValue + ", dailyBond=" + dailyBond
				+ ", getDate=" + getDate + ", lastUpdateTime=" + lastUpdateTime + ", toStage=" + toStage + ", toSkill1="
				+ toSkill1 + ", toSkill2=" + toSkill2 + ", toSkill3=" + toSkill3 + "]";
	}

}
